import { formatDate } from "@/utils/common.js";
let data =[]
let area = ['雨城区','天全县','荥经县','庐山区']
let warn = ['设备离线','阈值报警','通讯异常']
let pro = [1,2,3]
let water_level = []
for(var i = 1;i<=15;i++){
    var level = parseInt(Math.random()*80)
    data.push({
        date: setDate(),
        name: '设备' + i,
        area_name: area[Math.floor((Math.random() * area.length))],
        p_name: '项目' + pro[Math.floor((Math.random() * pro.length))],
        cstype: '机器检测',
        jobnumber: 'sl0000' + (i),
        water_level: level + 500,
        water_standard: 580,
        water_number: level + 400,
        water_number_: 480,
        flow: parseInt(Math.random() * 50),
        gate: warn[Math.floor((Math.random() * warn.length))],
        mark: ''
    })
}

function setDate(){
    return formatDate(new Date(new Date().getTime()-parseInt(Math.random()*60*60*1000)), "yyyy-MM-dd hh:mm:ss")
}
export default data